Hello,
Sorry for the novice mistake! I was trying to use different compilers in the NDK but i end up with the same error. The code i uploaded before was from one of my trials.
I did change my configuration to x86 but i still get the same error. Since this is my 1st time for android, I may have missed something.
The error stays the same. The 1st few line of my cmake error log states:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-g++
Build flags:
Id flags:
The output was:
1
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lstdc++
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lm
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -lc
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
and the cmake output states
-- The CXX compiler identification is GNU 4.9.0
-- Check for working CXX compiler: /home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc
-- Check for working CXX compiler: /home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler
"/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/user/testProjects/build-bubbleWork-Android_for_x86_GCC_4_9_Qt_5_9_3_for_Android_x86-Default/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_c05c5/fast"
/usr/bin/make -f CMakeFiles/cmTC_c05c5.dir/build.make
CMakeFiles/cmTC_c05c5.dir/build
make[1]: Entering directory
'/home/user/testProjects/build-bubbleWork-Android_for_x86_GCC_4_9_Qt_5_9_3_for_Android_x86-Default/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c05c5.dir/testCXXCompiler.cxx.o
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc
-o CMakeFiles/cmTC_c05c5.dir/testCXXCompiler.cxx.o -c
/home/user/testProjects/build-bubbleWork-Android_for_x86_GCC_4_9_Qt_5_9_3_for_Android_x86-Default/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_c05c5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c05c5.dir/link.txt
--verbose=1
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc
CMakeFiles/cmTC_c05c5.dir/testCXXCompiler.cxx.o -o cmTC_c05c5 -rdynamic
/home/user/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld:
error: cannot open crtbegin_dynamic.o: No such file or directory